	//JavaScript代码区域
	layui.use(['element','form','carousel','laytpl','layer','util'], function(){
		  var element = layui.element;
		  var carousel = layui.carousel;
		  var form = layui.form;
		  var laytpl = layui.laytpl;
		  var layer = layui.layer;
		  var $ =layui.$;
		  var util = layui.util;
			carousel.render({
		    elem: '#lunbo'
		    ,width: '1300'
		    ,height: '960'//设置容器宽度
		    ,arrow: 'always' //始终显示箭头
		    //,anim: 'updown' //切换动画方式
		  }); 
		  //取sessionStorage里面的userKey
		 
		  	
	  	var studentInfo = document.getElementById("studentInfo").innerHTML;
	  	var userKey = JSON.parse(sessionStorage.getItem("userKey"));
//	  	console.log(userKey)
		  	if (userKey) {
		  		//如果存在,则说明登录过,先比对过期时间
		  		var delayTime = userKey.delayTime
		  		var nowTime = new Date().getTime()
		  		if(nowTime < delayTime){
		  			//登录未失效
		  			laytpl(studentInfo).render(userKey,function(html){
		  					$("#studentInfoView").html(html)
		  					element.render()
		  			})
		  		}
		  	}
		  
		  
		 //执行聊天窗口
	  	util.fixbar({
		    bar1: "&#xe63a;"
		     ,css: {right: 50, bottom: 100}
		     ,bgcolor: '#393D49'
		    ,click: function(type){
		      console.log(type);
		      if(type === 'bar1'){
		       	 layer.msg("")
		      }
		    }
  		}); 
		  
		});

		function logout(){
	  	sessionStorage.clear();
	  	location.href ='../index.html'
	  }